jQuery(function($){
	window.ProfileModule.MyProjects = Spine.Controller.sub();

	window.ProfileModule.Likes = Spine.Controller.sub();

	window.ProfileModule.MyOrders = Spine.Controller.sub();

	window.ProfileModule.Profile = Spine.Controller.sub({
		elements: {
			".menu" : "menuEl",
			".view .personal-data": "personalDataEl",
			".view .my-projects": "myProjectsEl",
			".view .likes": "likesEl",
			".view .my-orders": "myOrdersEl"
		},
		
		init: function(){
			this.myData = new ProfileModule.PersonalData({ el: this.personalDataEl });
			this.myProjects = new ProfileModule.MyProjects({ el: this.myProjectsEl });
			this.likes = new ProfileModule.Likes({ el: this.likesEl });
			this.myOrders = new ProfileModule.MyOrders({ el: this.myOrdersEl });
			var states = new Spine.Manager(this.myData, this.myProjects, this.likes, this.myOrders);
			this.menu = new ProfileModule.ProfileMenu({
				el: this.menuEl,
				myDataPage: this.myData,
				myProjectsPage: this.myProjects,
				likesPage: this.likes,
				myOrdersPage: this.myOrders
			});
			this.myData.active();
		}
	});
});